package com.zhc.dejingapi.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 *
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(20000,"成功"),
    FAIL(20001, "失败"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),

    ORDER_PRICE_ERROR(210, "订单商品价格变化"),
    ORDER_STOCK_FALL(204, "订单库存锁定失败"),
    CREATE_ORDER_FAIL(210, "创建订单失败"),

    COUPON_GET(220, "优惠券已经领取"),
    COUPON_LIMIT_GET(221, "优惠券已发放完毕"),

    URL_ENCODE_ERROR( 216, "URL编码失败"),
    ILLEGAL_CALLBACK_REQUEST_ERROR( 217, "非法回调请求"),
    FETCH_ACCESS_TOKEN_FAIL( 218, "获取accessToken失败"),
    FETCH_USERINFO_ERROR( 219, "获取用户信息失败"),


    SKU_LIMIT_ERROR(230, "购买个数不能大于限购个数"),
    REGION_OPEN(240, "该区域已开通"),
    REGION_NO_OPEN(240, "该区域未开通"),

    ADMIN_SUCCESS(200,"登录成功"),
    ADMIN_NO_ACCOUNT(201,"用户不存在"),
    ADMIN_FAIL(201,"用户名或密码错误"),

    PROCESS_ROUTE_ADD_SUCCESS(200,"工艺路线添加成功"),
    PROCESS_ROUTE_ADD_FAIL(201,"工艺路线添加失败"),
    PROCESS_ROUTE_EXIST(202,"工艺路线已存在"),

    SEND_WORK_ADD_SUCCESS(200,"派工成功！！！"),
    SEND_WORK_ADD_FAIL(201,"派工失败，请检查派工情况！！！"),

    SEND_WORK_DELETE_SUCCESS(200,"删除派工任务成功！！！"),
    SEND_WORK_DELETE_FAIL(201,"删除派工任务失败，请检查派工情况！！！"),
    ;

    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
